<?php
namespace app\index\validate;

use app\common\entity\Config;
use app\common\entity\MarketPrice;
use think\Validate;

class BuyForm extends Validate
{
    protected $rule = [
        'title' => 'require',
        'price' => 'require|gt:0',
        'total' => 'require|gt:0',
        'min' => 'require|elt:total',
        'pay_type' => 'require',

    ];

    protected $message = [
        'title.require' => '标题不能为空',
        'price.require' => '单价不能为空',
        'min.require' => '挂单总额不能为空',
        'min.require' => '最小限额不能为空',
        'min.elt' => '最小限额不能大于总额',
        'price.require' => '请输入有效的单价',
        'total.require' => '请输入有效的总额',
    ];
}